<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录</title>
    <link rel="icon" href="images/favicon.ico">
    <link rel="stylesheet" href="css/common.css">
    <link rel="stylesheet" href="css/logo.css">
    <link rel="stylesheet" href="css/reset.css">
</head>
<body>
    <div class="header">
        <div class="nav-register">
            <div class="fd-fr jc-e ai-c">
                <a href="register.html" class="f14">注册</a>
            </div>
        </div>
        <img src="images/logo.png">
        <div class="logo">
            <div class="phone fd-fr jc-sb ai-c pb-5">
                <input id="username" class="f14 f999" type="text" placeholder="请输入手机号">
                <input class="f12" type="button" value="获取验证码">
            </div>
            <div class="phone fd-fr jc-sb ai-c pb-5">
                <input id="pwd" class="f14 f999" type="text" placeholder="请输入验证码">
            </div>
            <div class="mt-30 but">
                <button id="logo" class="fff">短信登录</button>
            </div>
        </div>
    </div>
</body>
<script>
    logo.onclick=function open(){
    var username= document.getElementById("username").value
    var pwd= document.getElementById("pwd").value
    if(username=='' || username==null) {
        alert("用户不能为空！"); 
        return false;
    }else if(pwd=='' || pwd==null){ 
        alert("验证码不能为空!"); 
        return false;
    }else{
        window.location.href="index.html";
    }
    }
    </script>
</html>